package com.he.run;

import com.he.test.component.TestComponent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author heyanjing
 * date:2020-03-12 2020/3/12:9:39
 */
@Slf4j
@Controller
@SpringBootApplication
public class Run {

    public static void main(String[] args) {
        SpringApplication.run(Run.class, args);
    }

    @Autowired
    private TestComponent component;

    @GetMapping("/run")
    @ResponseBody
    public String run() {
        return component.show();
    }

}
